/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package config;

/**
 *
 * Klasa u sebi sadrzi predefinisane konstante
 * koje sluze da se identifikuje tip poruka koje ce server
 * i klijent razmenjivati
 * @author dusan
 */
public class TransferProtocol
{
    public final static short PORT = 9999;
    public final static short SQL_QUERY = 1;
    public final static short ALTER_TABLE = 2;
    public final static short SQL_DATA = 3;
    public final static short USER_LOGIN = 4;
    public final static short USER_LOGOUT = 5;
    public final static short PASSWORD_CORRECT = 6;
    public final static short PASSWORD_INCORRECT = 7;
    public final static String HOST = "localhost";


    /* constants definitions for client2client and client2server communication */
    public final static short CLI_SEND_POSITIONS_MODIFY        = 30;  // clients sends request for modifying positions data
    public final static short SRV_SEND_POSITIONS_MODIFY_NOTIFY = 31;  // server sends notification to all that positions are modified
    public final static short CLI_SEND_TABLE_READ_DATA         = 32;  // client sends request for Sql results needed for the table class
    public final static short SRV_SEND_TABLE_READ_DATA         = 33;  // server sends SqlData to the table
    public final static short CLI_SEND_EMPLOYEE_ROW_MODIFY     = 34;  // clients sends request for modifying employee basic data
    public final static short SRV_NOTIFY_EMPLOYEE_ROW_MODIFIED = 35;  // server notifies all clients that current row is changed and sends them that row

    public final static short CLI_SEND_SQLLISTBOX_QUERY        = 36;  // clients sends request for executing query in the sql list box
    public final static short SRV_SEND_SQLLISTBOX_QUERY        = 37;  // server returns data to sql list box
    public final static short CLI_SEND_SQLCOMBOBOX_QUERY       = 38;  // clients sends request for executing query in the sql combo box
    public final static short SRV_SEND_SQLCOMBOBOX_QUERY       = 39;  // server returns data to sql combo box

    public final static short CLI_SEND_LOADEMPLOYEES_QUERY     = 40;  // clients sends request for executing query for employees listing
    public final static short SRV_SEND_LOADEMPLOYEES_QUERY     = 41;  // server returns data to employeesBrowser

    public final static short CLI_SEND_LISTPOSITIONCHANGE_QUERY = 42; // clients sends request for executing query for positions listing
    public final static short SRV_SEND_LISTPOSITIONCHANGE_QUERY = 44; // server returns data to employeePositionsEditor

    public final static short CLI_SEND_MODIFYPOSITION_01_QUERY  = 45; // clients sends request for executing query for modifying positions
    public final static short SRV_SEND_MODIFYPOSITION_01_QUERY  = 46; // server returns data to employeePositionsEditor
    public final static short CLI_SEND_MODIFYPOSITION_02_QUERY  = 47; // clients sends request for executing query for modifying positions
    public final static short SRV_SEND_MODIFYPOSITION_02_QUERY  = 48; // server returns notification back to the employeePositionsEditor
    public final static short CLI_SEND_DELETEPOSITION_QUERY     = 49; // clients sends request for executing query for deleting position
    public final static short SRV_SEND_DELETEPOSITION_QUERY     = 50; // server returns notification back to the employeePositionsEditor

    public final static short CLI_SEND_NEWPOSITION_01_QUERY     = 51; // clients sends request for executing query for adding new position
    public final static short SRV_SEND_NEWPOSITION_01_QUERY     = 52; // server returns data to employeePositionsEditor
    public final static short CLI_SEND_NEWPOSITION_02_QUERY     = 53; // clients sends request for executing query for adding new position
    public final static short SRV_SEND_NEWPOSITION_02_QUERY     = 54; // server returns notification back to the employeePositionsEditor

    public final static short CLI_SEND_EMPLOYEE_ROW_DELETE      = 55;  // clients sends request for modifying employee basic data
    public final static short SRV_NOTIFY_EMPLOYEE_ROW_DELETED   = 56;  // server notifies all clients that current row is changed and sends them that row

    public final static short CLI_SEND_EMPLOYEE_NEW_ID          = 57;  // clients sends request for new employeeID
    public final static short SRV_SEND_EMPLOYEE_NEW_ID          = 58;  // server sends back to the client new id

    public final static short CLI_SEND_INSURANCE_SELECT         = 59;  // clients sends request for selecting insuranced person
    public final static short SRV_SEND_INSURANCE_SELECT         = 60;  // server sends back to the client results
    public final static short CLI_SEND_INSURANCE_DELETE         = 61;  // clients sends request for selecting insuranced person
    public final static short SRV_SEND_INSURANCE_DELETE         = 62;  // server sends back notification to everyone
    public final static short CLI_SEND_INSURANCE_INSERT         = 63;  // clients sends request for inserting new person
    public final static short SRV_SEND_INSURANCE_INSERT         = 64;  // server sends back notification to everyone

}


